<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>v-model</title>
  <script src="../../js/vue.js"></script>
</head>

<body>
  <div id="app">
    <!-- <input type="text" v-model:value="kw"> -->
    <!-- 简写 -->
    <input type="text" v-model="kw">
    <!-- .lazy change 事件_之后_进行同步 -->
    <!-- <input type="text" v-model.lazy="kw"> -->
    <button @click="search()">百度一下</button>
    <p>{{kw}}</p>
  </div>
  <script>
    let vm = new Vue({
      el: "#app",
      data: {
        kw: ""
      },
      methods: {
        search() {
          console.log(`搜索 ${this.kw} 相关的内容`)

        }
      }
    });
  </script>
</body>

</html>